package com.demo.singleton;

/**
 * @Author: shubin_yao
 * @Date: 2022/05/10/21:37
 * @Description:
 * 懒汉模式: 线程非安全
 */
public class Singleton_01 {

    private static Singleton_01 instance;

    private Singleton_01() {
        System.out.println("=======构造方法Singleton_01");
    }

    public static  Singleton_01 getInstance() {
        if (instance != null) return instance;
        instance = new Singleton_01();
        return instance;
    }



}
